<template>
  <div class="order">
    <div class="order-group" v-for="(orders, key) in list" :key="key">
      <OrderDataItem2 :orders="orders" :keystr="key" @changeShortcut="changeShortcut"/>
    </div>

    <Subscribe v-model="state.orderData.subscribe.show" :data="state.orderData.subscribe.data" />
  </div>
</template>
<script setup>

import OrderDataItem2 from "./OrderDataItem2.vue";
import Subscribe from './Subscribe.vue'

const { state, store } = inject('Sell')
const emits = defineEmits()
const list = computed(() => {
  return state.orderData.type == 0 ? state.orderData.list : state.orderData.reservationList
})

const changeShortcut = () => {
    emits('changeShortcut')
}
</script>
<style lang="scss" scoped>
.order{
  padding: 8px 16px;
}
.order-group {
  border-bottom: 1px solid #ebebeb;
  margin-bottom: 16px;
  padding-bottom: 16px;
}
</style>
